<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>{$pagetitle}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <link rel="stylesheet" href="/static/admin/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/admin/css/admin_global.css">
  <link rel="stylesheet" href="/static/admin/plugin/select2/css/select2.min.css">
  <link rel="stylesheet" href="/static/admin/plugin/fancybox/jquery.fancybox-1.3.4.vot.css">
  <link rel="stylesheet" href="/static/admin/plugin/jsmind-master/style/jsmind.css">

  <style>
    table{
      table-layout: fixed;
    }
    td,th {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  </style>
</head>


<body>

<div class="layui-fluid padding-top-20">
  <div class="layui-card">
    <div class="layui-form-header">
      <div class="header-left" id="header-left">
        <span class="layui-btn iframe" data-href="{:url('add')}" data-height="100%" data-width="100%">add</span>
      </div>

      <div class="header-right">
        <form action="{:url()}" method="get" class="layui-form-pane" id="header-right">

        </form>
      </div>
    </div>
    <div class="layui-card-body">

      <form class="layui-form"  lay-filter="component-form-element" action="{:url()}"  method="post" onsubmit="return save_form(this);">

        <table class="layui-table" lay-filter="table1">

          <thead>
          <tr id="table-header">
          </tr>
          </thead>
          <tbody id="table-body">
          </tbody>

        </table>
        <div class="layui-inline" id="table-footer">
        </div>
      </form>
      <div class="layui-box layui-laypage layui-laypage-default" id="table-paginate">{$paginate|raw}</div>
    </div>

  </div>
</div>


<script src="/static/admin/layuiadmin/layui/layui.js"></script>
<script src="/static/js/jquery-3.6.2.min.js"></script>

<script src="/static/admin/plugin/select2/js/select2.full.min.js"></script>
<script src="/static/js/crypto-js.min.js"></script>
<script src="/static/admin/js/global.js"></script>

<script src="/static/admin/plugin/fancybox/jquery.easing-1.3.pack.js"></script>

<script src="/static/admin/plugin/fancybox/jquery.fancybox-1.3.4.vot.js"></script>
<script src="/static/admin/plugin/shengshiqu/distpicker.data.js"></script>
<script src="/static/admin/plugin/shengshiqu/distpicker.js"></script>
<script src="/static/admin/js/openfile.js"></script>
<script src="/static//admin/js/check.js"></script>
<script src="/static/admin/plugin/jsmind-master/js/jsmind.js"></script>


<!--文件上传 start-->
<script src="/static/admin/plugin/webuploader/kinderfile.js"></script>
<script src="/static/admin/plugin/webuploader/Sortable.js"></script>
<script src="/static/admin/plugin/webuploader/morepic.js"></script>


<!--以下是针对 快速上传单个文件插件-->
<link rel="stylesheet" href="/static/admin/plugin/webuploader/style/webuploader.css">
<link rel="stylesheet" href="/static/admin/plugin/webuploader/style/style.css">
<script src="/static/admin/plugin/webuploader/webuploader.min.js"></script>
<script src="/static/admin/plugin/webuploader/fastupimg.js"></script>


<script>
  function playVideoSrc(src) {
    if(src){
      $.fancybox({
        content:'<div class="fancybox_video_play"><video  style="width:100%;height:600px" id="fancybox_video_src" src="'+src+'" autoplay controls></video></div>',
      })
    }else{
      layer.msg("视频地址为空");
    }
  }
</script>


<script>

  $(document).ready(function() {
    $("a.fancybox").fancybox();
    $('.select2').select2();
  })

  layui.laydate.render({
    elem: '.form-date'
  })

</script>


<script id="js1"></script>


<script>
  function exportTable(){
    // 使用outerHTML属性获取整个table元素的HTML代码（包括<table>标签），然后包装成一个完整的HTML文档，设置charset为urf-8以防止中文乱码
    var html = "<html><head><meta charset='utf-8' /></head><body>" + document.getElementsByTagName("table")[0].outerHTML + "</body></html>";
    // 实例化一个Blob对象，其构造函数的第一个参数是包含文件内容的数组，第二个参数是包含文件类型属性的对象
    var blob = new Blob([html], { type: "application/vnd.ms-excel" });
    var a = document.getElementById("download_a");
    // 利用URL.createObjectURL()方法为a元素生成blob URL
    a.href = URL.createObjectURL(blob);
    // 设置文件名
    a.download = "{$exportName}.xls";
    a.click()
  }
</script>

</body>
</html>
